﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using TinCan.LRS.Web.Filters;

namespace TinCan.LRS.Web.Controllers
{
    [AllowCrossSiteJson]
    [AddOptionsSupport]
    [AddAcrhHeader]
    public class xApiController : ApiController
    {

        /// <summary>
        /// http://stackoverflow.com/questions/17498691/enabling-cors-with-webapi-put-post-requests
        /// </summary>
        /// <returns></returns>
        public virtual HttpResponseMessage Options()
        {
            var response = new HttpResponseMessage(HttpStatusCode.OK);
            return response;
        }
    }
}
